/**
 * @(#)XlsFont.java Created: 2009-10-29
 *
 * Copyright 2009 Zeus Medicine Group (ZS)
 * All rights reserved.
 *
 */

package nc.ui.zzjs.pub.excel;

import com.jacob.com.Dispatch;
import com.jacob.com.Variant;

/**Class - XlsFont.java
*
* @version 1.0
* @date 2009-10-29
* @author smile
*
**/
public class XlsFont {
	private Dispatch font = null;
	
	public XlsFont(Dispatch font) {
		this.font = font;
	}
	
	public Dispatch getDispatch() {
		return font;
	}
	
	public void setBackground(Variant v) {
		Dispatch.put(font, "Background", v);
	}
	
	public void setBord(boolean b) {
		Dispatch.put(font, "Bold", new Variant(b));
	}
	
	public void setBord(Variant v) {
		Dispatch.put(font, "Bold", v);
	}
	
	public void setColor(Variant v) {
		Dispatch.put(font, "Color", v);
	}
	
	public void setColorIndex(int index) {
		Dispatch.put(font, "ColorIndex", new Variant(index));
	}
	
	public void setItalic(Variant v) {
		Dispatch.put(font, "Italic", v);
	}
	
	public void setFontName(Variant v) {
		Dispatch.put(font, "Name", v);
	}
	
	public void setSize(double size) {
		Dispatch.put(font, "Size", new Variant(size));
	}
	
	public void setSize(Variant v) {
		Dispatch.put(font, "Size", v);
	}
	
	public void setUnderline(Variant v) {
		Dispatch.put(font, "Underline", v);
	}
}
